<% if current_user.pref3 == "first name" -%>
<% for contact in @contacts -%>
<% content_tag :div, :class => 'container' do%>
	<% content_tag :div, :class => '' do -%>
		<%= content_tag :img, nil, :src => '/images/icons/icons_71.png', :class => 'icon' -%>
		<% content_tag :a, :href => '/contacts/edit/'+contact.id.to_s do -%>
			<%= content_tag :strong, contact.first_entry.fname %>
			<%= content_tag :span, " " + contact.first_entry.lname -%>
		<% end -%>
		<%= content_tag :span, contact.first_entry.relationship, :class => 'flright' -%>
	<% end -%>
<% end -%>
<% end -%>
<% elsif current_user.pref3 == "last name" -%>
<% for contact in @contacts -%>
<% content_tag :div, :class => 'container' do%>
	<% content_tag :div, :class => '' do -%>
		<%= content_tag :img, nil, :src => '/images/icons/icons_71.png', :class => 'icon' -%>
		<% content_tag :a, :href => '/contacts/edit/'+contact.id.to_s do -%>
			<%= content_tag :strong, contact.first_entry.lname %>
			<%= content_tag :span, ", " + contact.first_entry.fname -%>
		<% end -%>
		<%= content_tag :span, contact.first_entry.relationship, :class => 'flright' -%>
	<% end -%>
<% end -%>
<% end -%>
<% else -%>
<% for contact in @contacts -%>
<% content_tag :div, :class => 'container' do%>
	<% content_tag :div, :class => '' do -%>
		<%= content_tag :img, nil, :src => '/images/icons/icons_71.png', :class => 'icon' -%>
		<% content_tag :a, :href => '/contacts/edit/'+contact.id.to_s do -%>
			<%= content_tag :strong, contact.first_entry.created_at.strftime(" %Y.%m.%d ") %>
			<%= content_tag :span, contact.first_entry.fname + " " + contact.first_entry.lname -%>
		<% end -%>
		<%= content_tag :span, contact.first_entry.relationship, :class => 'flright' -%>
	<% end -%>
<% end -%>
<% end -%>
<% end -%>